<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PinCRT: Thread local storage</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">PinCRT
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Thread local storage</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga104d9da3707327696915b45866e0ad19"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga104d9da3707327696915b45866e0ad19">TLS_DESTRUCTOR</a>) (VOID *)</td></tr>
<tr class="separator:ga104d9da3707327696915b45866e0ad19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0987db84fd6e93b83d2e89e436c37ad1"><td class="memItemLeft" align="right" valign="top">typedef ADDRINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a></td></tr>
<tr class="separator:ga0987db84fd6e93b83d2e89e436c37ad1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadad938be8a50c78d373e6e8f3d17f995"><td class="memItemLeft" align="right" valign="top">VOID *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#gadad938be8a50c78d373e6e8f3d17f995">OS_TlsGetBaseAddress</a> ()</td></tr>
<tr class="separator:gadad938be8a50c78d373e6e8f3d17f995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae9eea41e2ccdc1ad177d30932deb1be5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#gae9eea41e2ccdc1ad177d30932deb1be5">OS_TlsAlloc</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga104d9da3707327696915b45866e0ad19">TLS_DESTRUCTOR</a> dest)</td></tr>
<tr class="separator:gae9eea41e2ccdc1ad177d30932deb1be5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7c1fb452934baf5ed40089373f894689"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga7c1fb452934baf5ed40089373f894689">OS_TlsFree</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a> idx)</td></tr>
<tr class="separator:ga7c1fb452934baf5ed40089373f894689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6c456f5bfe02c549b1b1224c4db7644"><td class="memItemLeft" align="right" valign="top">VOID *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#gac6c456f5bfe02c549b1b1224c4db7644">OS_TlsGetValue</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a> idx)</td></tr>
<tr class="separator:gac6c456f5bfe02c549b1b1224c4db7644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaccb9f3e0a0cbe9acefe341850f13ebd9"><td class="memItemLeft" align="right" valign="top">VOID *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#gaccb9f3e0a0cbe9acefe341850f13ebd9">OS_TlsGetValueForThread</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a> idx, <a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a> ntid)</td></tr>
<tr class="separator:gaccb9f3e0a0cbe9acefe341850f13ebd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d0c8f8e6b8146dee4aba4b0aa97d790"><td class="memItemLeft" align="right" valign="top">VOID **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga3d0c8f8e6b8146dee4aba4b0aa97d790">OS_TlsGetArrayAddress</a> (void)</td></tr>
<tr class="separator:ga3d0c8f8e6b8146dee4aba4b0aa97d790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32b1151316dc38c3adf607c9b2de786e"><td class="memItemLeft" align="right" valign="top">VOID **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga32b1151316dc38c3adf607c9b2de786e">OS_TlsGetArrayAddressForThread</a> (<a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a> ntid)</td></tr>
<tr class="separator:ga32b1151316dc38c3adf607c9b2de786e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2ec9d0e6db3072f25960f4475948244"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#gae2ec9d0e6db3072f25960f4475948244">OS_TlsSetValue</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a> idx, VOID *val)</td></tr>
<tr class="separator:gae2ec9d0e6db3072f25960f4475948244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2afe56e095f96a389f960b79bb842bed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga2afe56e095f96a389f960b79bb842bed">OS_TlsSetValueForThread</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a> idx, <a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a> ntid, VOID *val)</td></tr>
<tr class="separator:ga2afe56e095f96a389f960b79bb842bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga102aa3118b484d950429d1062748ed89"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga102aa3118b484d950429d1062748ed89">OS_TlsFreeThreadTls</a> (<a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a> ntid)</td></tr>
<tr class="separator:ga102aa3118b484d950429d1062748ed89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa4e3ad1fa5e3c3286e9ca4a233a84b0b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PIN__TLS.html#gaa4e3ad1fa5e3c3286e9ca4a233a84b0b">OS_TlsAddStaticTlsDestructor</a> (<a class="el" href="group__OS__APIS__PIN__TLS.html#ga104d9da3707327696915b45866e0ad19">TLS_DESTRUCTOR</a> destructor)</td></tr>
<tr class="separator:gaa4e3ad1fa5e3c3286e9ca4a233a84b0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga0987db84fd6e93b83d2e89e436c37ad1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0987db84fd6e93b83d2e89e436c37ad1">&#9670;&nbsp;</a></span>PIN_TLS_INDEX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef ADDRINT <a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type for index inside the dynamic TLS. </p>

</div>
</div>
<a id="ga104d9da3707327696915b45866e0ad19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga104d9da3707327696915b45866e0ad19">&#9670;&nbsp;</a></span>TLS_DESTRUCTOR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* TLS_DESTRUCTOR) (VOID *)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Prototype for TLS value destructor function. The only argument for this function is the value stored in TLS. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaa4e3ad1fa5e3c3286e9ca4a233a84b0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa4e3ad1fa5e3c3286e9ca4a233a84b0b">&#9670;&nbsp;</a></span>OS_TlsAddStaticTlsDestructor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a> OS_TlsAddStaticTlsDestructor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga104d9da3707327696915b45866e0ad19">TLS_DESTRUCTOR</a>&#160;</td>
          <td class="paramname"><em>destructor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a destructor for all threads' static TLS. The destructor for static TLS is called on each thread termination, provided that the thread had an allocated static TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">destructor</td><td>Destructor function that will be called with the pointer to the fixed TLS when a thread terminates.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gae9eea41e2ccdc1ad177d30932deb1be5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae9eea41e2ccdc1ad177d30932deb1be5">&#9670;&nbsp;</a></span>OS_TlsAlloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a> OS_TlsAlloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga104d9da3707327696915b45866e0ad19">TLS_DESTRUCTOR</a>&#160;</td>
          <td class="paramname"><em>dest</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Allocates a new slot in the dynamic TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dest</td><td>Optional destructor function that will be called on each value stores in TLS when its corresponding thread dies.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Index for the newly allocated slot or OS_APIS_INVALID_PIN_TLS_INDEX on error.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga7c1fb452934baf5ed40089373f894689"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7c1fb452934baf5ed40089373f894689">&#9670;&nbsp;</a></span>OS_TlsFree()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a> OS_TlsFree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a>&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Free a previously allocated slot in the dynamic TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>The index to free.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True on success.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga102aa3118b484d950429d1062748ed89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga102aa3118b484d950429d1062748ed89">&#9670;&nbsp;</a></span>OS_TlsFreeThreadTls()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID OS_TlsFreeThreadTls </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a>&#160;</td>
          <td class="paramname"><em>ntid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Free all resources that are used for a particular thread's TLS. This function is usually called when a thread is about to exit.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ntid</td><td>The thread ID for which the TLS need to be freed.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga3d0c8f8e6b8146dee4aba4b0aa97d790"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d0c8f8e6b8146dee4aba4b0aa97d790">&#9670;&nbsp;</a></span>OS_TlsGetArrayAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID** OS_TlsGetArrayAddress </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the address of the static TLS for the current thread</p>
<dl class="section return"><dt>Returns</dt><dd>Address of the static TLS for the current threads (which is a VOID* array).</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga32b1151316dc38c3adf607c9b2de786e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga32b1151316dc38c3adf607c9b2de786e">&#9670;&nbsp;</a></span>OS_TlsGetArrayAddressForThread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID** OS_TlsGetArrayAddressForThread </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a>&#160;</td>
          <td class="paramname"><em>ntid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the address of the static TLS for a particular thread</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ntid</td><td>The thread ID for which the static TLS will be retrieved.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Address of the static TLS for the specified threads (which is a VOID* array).</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gadad938be8a50c78d373e6e8f3d17f995"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadad938be8a50c78d373e6e8f3d17f995">&#9670;&nbsp;</a></span>OS_TlsGetBaseAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID* OS_TlsGetBaseAddress </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the base address for the application-wide TLS data structure. The TLS data structure is used to implement a TLS which is not based on segment registers.</p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the base address of the TLS data structure.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gac6c456f5bfe02c549b1b1224c4db7644"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac6c456f5bfe02c549b1b1224c4db7644">&#9670;&nbsp;</a></span>OS_TlsGetValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID* OS_TlsGetValue </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a>&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the value associated with a particular index from the current thread's dynamic TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>The index of the value to get.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the value, or NULL otherwise.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaccb9f3e0a0cbe9acefe341850f13ebd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaccb9f3e0a0cbe9acefe341850f13ebd9">&#9670;&nbsp;</a></span>OS_TlsGetValueForThread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID* OS_TlsGetValueForThread </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a>&#160;</td>
          <td class="paramname"><em>ntid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the value associated with a particular index of a particular thread's dynamic TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>The index of the value to get. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ntid</td><td>The thread ID for which the TLS value will be retrieved.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the value, or NULL otherwise.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gae2ec9d0e6db3072f25960f4475948244"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2ec9d0e6db3072f25960f4475948244">&#9670;&nbsp;</a></span>OS_TlsSetValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a> OS_TlsSetValue </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the value associated with a particular index in the current thread's dynamic TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>The index of the value to set. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>The new value to set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True on success.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga2afe56e095f96a389f960b79bb842bed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2afe56e095f96a389f960b79bb842bed">&#9670;&nbsp;</a></span>OS_TlsSetValueForThread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a> OS_TlsSetValueForThread </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__PIN__TLS.html#ga0987db84fd6e93b83d2e89e436c37ad1">PIN_TLS_INDEX</a>&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#ga20167a3cedec6512ccdc030b50ee780b">NATIVE_TID</a>&#160;</td>
          <td class="paramname"><em>ntid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the value associated with a particular index in of a particular thread's dynamic TLS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>The index of the value to set. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ntid</td><td>The thread ID for which the value will be set in its TLS. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>The new value to set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True on success.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
